package 设计模式.适配器模式;

import sun.nio.cs.ext.ISO2022_JP_2;
import 设计模式.适配器模式.adaptor.ElectricCooker;
import 设计模式.适配器模式.adaptor.PowerAdaptor;
import 设计模式.适配器模式.impl.CN220VInterfaceImpl;
import 设计模式.适配器模式.impl.JP110VInterfaceImpl;

public class Test {
    public static void main(String[] args) {
        JP110VInterface jp110VInterface = new JP110VInterfaceImpl();
        CN220VInterface cn220VInterface = new CN220VInterfaceImpl();
//        jp110VInterface.connect();
//        cn220VInterface.connect();


        PowerAdaptor powerAdaptor = new PowerAdaptor(cn220VInterface);
        ElectricCooker electricCooker = new ElectricCooker(powerAdaptor);
        electricCooker.cook();

    }
}
